<template>
  <li @click="handleClick(map)"><a href="#">实时路况</a></li>
</template>

<script setup>
import { useRealMap } from './Hooks/useRealMap'
const flag = ref(false)
const map = ref()

onMounted(async () => {
  map.value = await useGlobalMap()
})

const handleClick = (map) => {
  // console.log(22);
  flag.value = !flag.value
  useRealMap(map, flag.value)
}
</script>

<style lang="less" scoped>
a {
  text-decoration: none;
  color: black;
}
</style>
